//自动生成HTML插件
const HtmlWebpackPlugin = require('html-webpack-plugin')
//插件加载
const { VueLoaderPlugin } = require('vue-loader')

const path = require("path")


module.exports = {
    //打包入口文件
    entry: path.join(__dirname,'./src/main.js'),
    output: {
        //打包输出路径
        path: path.join(__dirname, 'dist'),
        filename: '[name].[contenthash:6].js'
        
    },
    

    plugins: [
        // 自动生成HTML插件
        new HtmlWebpackPlugin({
            template: "./public/index.html",
            title: "webpack",
            templateParameters: {
                BASE_URL: "/"
            }
        }),
        new VueLoaderPlugin()
    ]
}